{template 'common/header'}
<link rel="stylesheet" href="../addons/goouc_class/style/toast/css/toast.css">
<form action="" method="post" class="form-horizontal message" role="form" style="width:100%" onsubmit="return formcheck()">
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">H5公众号参数设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">appid</label>
			<div class="col-sm-10">
				<input type="text" name="h5_appid" value="{if empty($settings['h5_appid'])}{else}{$settings['h5_appid']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">appsecret</label>
			<div class="col-sm-10">
				<input type="text" name="h5_appsecret" value="{if empty($settings['h5_appsecret'])}{else}{$settings['h5_appsecret']}{/if}" class="form-control"  style="width:98%" />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group  remd" style="margin-top:25px">
			<label  class="col-sm-2 control-label">H5入口链接</label>
			<div class="col-sm-10">
				<input type="text" id = 'h5url' name="h5url" value="{$_W['siteroot']}addons/goouc_class_plugin_h5/vue/index.html?i={$_W['uniacid']}&c=goouc" class="form-control"  style="width:60%;float: left;"  readonly/>
				<input id="copyUrl"  value="复制链接" class="btn btn-info" style="float: left;margin-left: 20px;" >
				<span class="help-block"></span>
			</div>
		</div>

	</div>
	<p  class="list-group-item" style="background-color: #D9EDF7;margin:0 auto">H5分享设置</p>
	<div active="list-group-item" style="border:1px solid #cecece;margin:0 auto">
		<div class="form-group" style="margin-top:25px">
			<label  class="col-sm-2 control-label">分享描述</label>
			<div class="col-sm-10">
				<input type="text" name="sharetitle" value="{if empty($settings['sharetitle'])}{else}{$settings['sharetitle']}{/if}" class="form-control"  style="width:98%"  />
				<span class="help-block"></span>
			</div>
		</div>
		<div class="form-group">
			<label  class="col-sm-2 control-label">icon图标</label>
			<div class="col-sm-10">
				{php echo tpl_form_field_image('shareicon',$settings['shareicon'])}
				<span class="help-block">图标尺寸是：100*100</span></span>
			</div>
		</div>
	</div>
	<input type="hidden" name="token" value="{$_W['token']}">
	<div style="float: right;margin:10px">
		<input type="submit" name="submit" value="保存设置" class="btn btn-info" >
	</div>
	<div style="clear: both;"></div>
</form>
<script src="../addons/goouc_class/style/toast/js/toast.js"></script>
<script>
    $('#copyUrl').on('click',function(){
        copyUrl($(this));
    });
    function copyUrl (obj){
        if($('#urlText').length == 0){
            var url =$('#h5url').val();

            // 创建input
            obj.after('<input id="urlText" style="position:fixed;top:-200%;left:-200%;" type="text" value=' +url + '>');
        }
        $('#urlText').select(); //选择对象
        document.execCommand("Copy"); //执行浏览器复制命令
        $('.remd').toast({
            content:'复制链接成功',
            duration:1500
        });
        return false;

    }
</script>
{template 'common/footer'}